package com.zpc.rabbitmq.config;


import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 队列配置 可以配置多个列
 * 
 * @author Dhjie
 *
 */
@Configuration
public class ExchangeConfig {
	/**
	 * 路由模式交换机
	 * @return
	 */
	@Bean
	public DirectExchange testExchange() {
		DirectExchange directExchange = new DirectExchange(MqConfig.EXCAHNGE_NAME, true, false);
		return directExchange;
	}
	
	@Bean
	public DirectExchange testExchange001() {
		return new DirectExchange(MqConfig.EXCAHNGE_NAME, true, false);
	}
	
	@Bean
	public FanoutExchange fanoutExchange() {
		return new FanoutExchange(MqConfig.EXCAHNGE_FANOUT_NAME);
	}
}
